When character information such as superimposition, the words, a liner note (liner note: information and comments about the music or the performer that, in most cases, comes with a package of a CD and a record or is printed on the cover of a record) and titles are displayed together with a moving picture such as a movie and a still picture such as a scenery, a portrait and a still life, it is customary that a moving picture and a still picture are natural images, and hence it is desired that they should be compressed and stored in advance by a compression method such as a JPEG (Joint Photographic Expert Group) which is a color still image compression system and an MPEG (Moving Picture Expert Group) which is a color moving image compression system. However, since it is customary to create character information artificially and the kinds of colors that can be used with character information are less, in most cases, character information is generally stored in the state in which it is compressed by run-length coding that is advantageous for compressing character information.
In other words, when character information such as superimposition of a movie and the words of music and liner notes is displayed on a display apparatus such as a television receiver and the like from a disc apparatus or the like as a still picture, character information is recorded on a storage medium such as a disc in the state in which it is compressed in advance by run-length coding.
For example, if a characters is colored white, the edges of the character are colored two colors of black and red and other remaining ground portion is colored transparent color, white, black, red and transparent color are expressed by binary numbers of “11”, “10”, “01”, “00” and any one of binary numbers corresponds to each pixel on a picture, an image containing the character information can be created easily. In that case, these binary numbers “11”, “10”, “01”, “00” are called color code data. A correspondence between actual color data expressed by YCbCr-system and the like and color code data is called a palette.
In the run-length coding, as shown in FIG. 8, first, color code data of respective pixels on a horizontal line are sequentially examined from left to right on a horizontal (scanning) line L1 and the number in which the same color code data are continued is run-length-coded. Thereafter, with respect to horizontal lines L2, L3, . . . , the numbers in which the same color code data are continued are examined and the resultant number are run-length-coded.
In the case of the above-mentioned run-length coding on the horizontal direction, that is, when the same color code data are continued long in the horizontal direction, although a compression rate with respect to the line of the lateral direction of the characters is increased, correlation caused by a thickness of the line of the longitudinal direction and a thickness of the line of the lateral direction of the character is not utilized.
As a method of using a correlation in the vertical direction with ease, when data of Nth horizontal line (N=2, 3, 4, . . . ) from above is compressed by run-length coding, the color code data of each pixel on this horizontal line is not directly compressed by run-length coding but a difference between it and the color code data of each pixel on N−1th horizontal line which is the immediately-preceding adjacent horizontal line may be calculated and the number in which the same difference data is continued may be compressed by run-length coding (differential run-length coding compression). To be concrete, as shown in FIG. 9, assuming that color code data of i-th pixel (i=1, 2, 3, . . . ) from the left on the N−1-th horizontal line is PN-1, i, then difference data DN, i in the i-th pixel from left is calculated as DN, i=PN, iPN,i. In this manner, the difference data on the N−1−th horizontal line is calculated and is compressed by run-length coding. In this connection, in the above-described equation, the symbol  represents an exclusive-OR calculation. With respect to 1st horizontal line (N=1), the color code data of each pixel on that horizontal line is directly compressed by run-length coding.
In this connection, as the cited patent reference concerning this kind of technology, there may be enumerated Official Gazette of Japanese laid-open patent application 64-7715 published by Japan Patent Office. This Official Gazette of Japanese laid-open patent application No. 64-7715 has described the technology in which not only difference data on the main scanning direction but also difference data on the sub-scanning direction is calculated.
When it is assumed that an image is to be displayed by a high-resolution display apparatus such as an HDTV (High Definition TV), if the number of pixels per picture is composed of 1920 pixels in the horizontal direction and 1080 pixels in the vertical direction, then a memory capacity of a line memory (for example, shift register) necessary for a differential run-length coding compression process of character information image and its decoding expansion process requires 1920×2 bits indeed. In other words, even in the high-resolution image, the memory capacity of the line memory should be decreased and the character information image should be compressed by the differential run-length coding process and expanded by a decoding process.
It is an object of the present invention to provide an image coding apparatus in which, even when a high-resolution image contains character information, a memory capacity of a line memory can be decreased and in which an image can be efficiently coded and compressed.
It is other object of the present invention to provide an image coding method in which, even when a high-resolution image contains character information, an image can be coded and compressed economically and efficiently.
It is a further object of the present invention to provide a coded image decoding apparatus in which, even when a high-resolution image contains character information, an efficiently-coded and-compressed image can be decoded and expanded by a line memory with a decreased memory capacity.
It is yet a further object of the present invention to provide a coded image decoding method in which, even when a high-resolution image contains character information, an efficiently-coded and-compressed image can be decoded and expanded economically.